﻿<?xml version="1.0" encoding="utf-8" ?>
<Database Name="test" xmlns="http://schemas.microsoft.com/linqtosql/mapping/2007">
  <Table Name="L2S_TestClassTable">
    <Type Name="Magiq.Tests.Sql.TestModel.LinqToSqlTestClass" >
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnAnotherIntProperty" Member="AnotherIntProperty" />
      <Column Name="ColumnAnotherStringProperty" Member="AnotherStringProperty" />
      <Column Name="ColumnIntProperty" Member="IntProperty" />
      <Column Name="ColumnNullableIntProperty" Member="NullableIntProperty" />
      <Column Name="ColumnStringProperty" Member="StringProperty" />
      <Column Name="ColumnReferenceId" Member="ReferenceId" />
      <Column Name="ColumnReference2Id" Member="Reference2Id" />
      <Column Name="ColumnSelfReferenceId" Member="SelfReferenceId" />
      <Association Member="Reference" IsForeignKey="true" ThisKey="ReferenceId" />
      <Association Member="Reference2" IsForeignKey="true" ThisKey="Reference2Id" OtherKey="Id" />
      <Association Member="SelfReference" Storage="selfReference" IsForeignKey="true" ThisKey="SelfReferenceId" OtherKey="Id" />
    </Type>
  </Table>
  
  <Table Name="L2S_TestSuperClassTable">
    <Type Name="Magiq.Tests.Sql.TestModel.LinqToSqlTestSuperClass" InheritanceCode="0" IsInheritanceDefault="true">
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnAnotherIntProperty" Member="AnotherIntProperty" />
      <Column Name="ColumnAnotherStringProperty" Member="AnotherStringProperty" />
      <Column Name="ColumnIntProperty" Member="IntProperty" />
      <Column Name="ColumnNullableIntProperty" Member="NullableIntProperty" />
      <Column Name="ColumnStringProperty" Member="StringProperty" />
      <Column Name="ColumnReferenceId" Member="ReferenceId" />
      <Column Name="ColumnReference2Id" Member="Reference2Id" />
      <Column Name="ColumnSelfReferenceId" Member="SelfReferenceId" />
      <Association Member="Reference" IsForeignKey="true" ThisKey="ReferenceId" />
      <Association Member="Reference2" IsForeignKey="true" ThisKey="Reference2Id" OtherKey="Id" />
      <Association Member="SelfReference" Storage="selfReference" IsForeignKey="true" ThisKey="SelfReferenceId" OtherKey="Id" />
      <Column Name="ColumnType" Member="Type" IsDiscriminator="true"/>
      <Type Name="Magiq.Tests.Sql.TestModel.LinqToSqlTestSubClass" InheritanceCode="1" >
        <Column Name="ColumnInheritorProperty" Member="InheritorProperty" />
      </Type>
    </Type>
  </Table>
  
  <Table Name="L2S_ReferenceTestClassTable">
    <Type Name="Magiq.Tests.TestModel.ReferenceTestClass">
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnStringProperty" Member="StringProperty" />
      <Column Name="ColumnIntProperty" Member="IntProperty" />
    </Type>
  </Table>
  
  <Table Name="L2S_AnotherTestClassTable">
    <Type Name="Magiq.Tests.TestModel.AnotherTestClass">
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnInt" Member="Int" />
     </Type>
  </Table>
  <Table Name="L2S_CompositePkParent">
    <Type Name="Magiq.Tests.Sql.TestModel.CompositePkParent">
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnProp" Member="Prop" />
      <Column Name="ColumnChildId1" Member="ChildId1" />
      <Column Name="ColumnChildId2" Member="ChildId2" />
      <Association Member="Child" IsForeignKey="true" ThisKey="ChildId1,ChildId2" OtherKey="Id1, Id2" />
    </Type>
  </Table>
  <Table Name="L2S_CompositePkChild">
    <Type Name="Magiq.Tests.Sql.TestModel.CompositePkChild">
      <Column Name="ColumnId1" Member="Id1" IsPrimaryKey="true" IsDbGenerated="false" />
      <Column Name="ColumnId2" Member="Id2" IsPrimaryKey="true" IsDbGenerated="false" />
      <Column Name="ColumnProp" Member="Prop" />
    </Type>
  </Table>
  <Table Name="L2S_ChildItem">
    <Type Name="Magiq.Tests.Sql.TestModel.ChildItem">
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnName" Member="Name" />
      <Column Name="ColumnParentId" Member="ParentId" />
    </Type>
  </Table>
  <Table Name="L2S_Parent">
    <Type Name="Magiq.Tests.Sql.TestModel.Parent">
      <Column Name="ColumnId" Member="Id" IsPrimaryKey="true" IsDbGenerated="true" />
      <Column Name="ColumnName" Member="Name" />
      <Association Member="Items" IsForeignKey="false" Storage="items" ThisKey="Id" OtherKey="ParentId"/>
    </Type>
  </Table>
</Database>
